/**
 * @在函数中改变数组元素
 *
 * @author	 wangshikun <wangshikun2010@gmail.com>
 * @copyright	(c) 2012 wangshikun <wangshikun2010@gmail.com>
 * @license	http://www.opensource.org/licenses/mit-license.php The MIT License
 * @package	default
 * @subpackage	default
 */

#include <stdio.h>
#include <cs50.h>

void number (float array[], int n);

int main(int argc, char *argv[]) {
	float values[4] = {1.2,-3.7f, 6.2f, 8.55f};

	number(values, 4);

	for (int i=0; i<4; i++) {
		printf("%.2f  ", values[i]);
	}

	printf("\n");

	return 0;
}

void number (float array[], int n) {
	for (int i=0; i<n; i++) {
		array[i] *= 2;
	}
} 
